<template>
  <div class="bpl1-bg">
    <div class="el-flex">
      <div class="co-title-name">
        <img src="@/assets/cockpit/subdivision/securityOneMap/item6-title.png" alt="" />
      </div>
      <div class="co-title-right">
        <div class="co-title-breathe"><i></i><i></i><i></i><i></i><i></i><i></i></div>
      </div>
    </div>
    <div class="content">
      <div class="total-area">
        <div class="label">安全隐患排查数</div>
        <div class="num">97,257<span>栋</span></div>
      </div>
      <div class="yinghuan">
        <div class="item yanzhong">
          <b></b><span>严重隐患</span>
          <p>97,257</p>
        </div>
        <div class="item jiaoda">

          <b></b><span>较大隐患</span>
          <p>97,257</p>
        </div>
        <div class="item yiban">

          <b></b><span>一般隐患</span>
          <p>97,257</p>
        </div>
        <div class="item none">
          <b></b><span>无安全隐患</span>
          <p>97,257</p>
        </div>
      </div>
      <p class="title">房屋手续情况</p>
      <div class="shouxu-box">
        <ul>
          <li class="tag"><span>无手续：</span><span><b>15</b>处</span></li>
          <li class="tag"><span>仅有一证：</span><span><b>15</b>处</span></li>
          <li class="tag"><span>仅有两证</span><span><b>15</b>处</span></li>
          <li class="tag"><span>有三证：</span><span><b>15</b>处</span></li>
          <li class="tag"><span>有四证：</span><span><b>15</b>处</span></li>
          <li class="tag"><span>手续齐全：</span><span><b>15</b>处</span></li>

        </ul>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { Vue, Component } from 'vue-property-decorator'
import { CockpitApi } from '@/api/cockpit'

interface obj {
  count: string
}

@Component({
  name: 'Item6'
})
export default class Item6 extends Vue {
  private totalObj: obj = {
    count: '0'
  }
  private list1 = []
  private list2 = []
  created() {
    this.init()
    this.initList()
  }
  init() {
    CockpitApi.administrationApi('doc').then((res) => {
      this.totalObj = res.data.dataList && res.data.dataList[0]
    })
  }
  initList() {
    CockpitApi.administrationApi('docBorrowTop').then((res) => {
      this.list1 = (res.data && res.data.dataList).slice(0, 4) || []
      this.list2 = (res.data && res.data.dataList).slice(4, 8) || []
    })
  }
}
</script>
<style lang="scss" scoped>
@import '~@/styles/cockpit.scss';
.bpl1-bg {
  width: 100%;
  height: 100%;
  padding: 16px;
  background: url('~@/assets/cockpit/subdivision/administration/item-bg4.png') no-repeat 0/ 100% 100%;
  position: relative;
  display: flex;
  flex-direction: column;

  .co-title {
    flex-shrink: 0;
  }
}
.content {
  .total-area {
    width: 428px;
    height: 50px;
    line-height: 50px;
    background: url('~@/assets/cockpit/subdivision/administration/total-bg.png') no-repeat 0/ 100% 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px 0 32px;
    margin-top: 0px;
    .label {
      color: rgba(0, 181, 211, 1);
      font-size: 18px !important;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
    }
    .num {
      color: #fff;
      font-size: 28px !important;
      span {
        font-size: 14px !important;
        margin-left: 4px;
      }
    }
  }
  .yinghuan {
    display: flex;
    margin-top: 16px;
    .item {
      width: 40%;
      height: 52px;
      flex-grow: 1;
      margin-right: 12px;
      b {
        display: inline-block;
        width: 24px;
        height: 24px;
        margin-right: 4px;
      }
      span {
        display: inline-block;
        position: relative;
        top: -6px;
        font-size: 12px;
        line-height: 17px;
      }
      p {
        color: #fff;
        padding-left: 28px;
        font-size: 16px;
      }
      &:last-of-type {
        margin-right: 0;
      }
      &.yanzhong {
        background: url('~@/assets/cockpit/subdivision/securityOneMap/item6-1-bg.png') no-repeat;
        span {
          color: #e05713;
        }
        b {
          background: url('~@/assets/cockpit/subdivision/securityOneMap/item6-1-icon.png') no-repeat;
        }
      }
      &.jiaoda {
        background: url('~@/assets/cockpit/subdivision/securityOneMap/item6-2-bg.png') no-repeat;
        span {
          color: #ffcd3e;
        }
        b {
          background: url('~@/assets/cockpit/subdivision/securityOneMap/item6-2-icon.png') no-repeat;
        }
      }
      &.yiban {
        background: url('~@/assets/cockpit/subdivision/securityOneMap/item6-3-bg.png') no-repeat;
        span {
          color: #1c7ced;
        }
        b {
          background: url('~@/assets/cockpit/subdivision/securityOneMap/item6-3-icon.png') no-repeat;
        }
      }
      &.none {
        background: url('~@/assets/cockpit/subdivision/securityOneMap/item6-4-bg.png') no-repeat;
        span {
          color: #0df4c5;
        }
        b {
          background: url('~@/assets/cockpit/subdivision/securityOneMap/item6-4-icon.png') no-repeat;
        }
      }
    }
  }
  .shouxu-box ul {
    display: flex;
    flex-wrap: wrap;
    li {
      width: 33.33%;
    }
  }
  .title {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 8px;
    // line-height: 24px;
    font-size: 14px !important;
    color: #fff;
    margin-top: 18px;
    margin-bottom: 18px;
    background: linear-gradient(90deg, rgba(0, 106, 255, 1) 0%, rgba(0, 106, 255, 0) 100%);
    &::before {
      content: '';
      display: block;
      width: 2px;
      height: 8px;
      margin-right: 6px;
      background: rgba(0, 234, 255, 1);
      box-shadow: 0 0 8px 0 rgba(0, 149, 255, 1);
    }
  }
  .tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    padding: 6px;
    display: flex;
    align-items: baseline;
    > span {
      color: #fff;
      font-size: 12px;
      b {
        display: inline-block;
        margin-right: 3px;
        font-size: 16px;
        font-weight: bold;
        font-family: 'Roboto';
      }
      &:nth-of-type(1) {
        margin-left: 10px;
      }
      &:nth-of-type(2) {
        margin-left: auto;
      }
    }
    &::before {
      content: '';
      width: 7px;
      height: 7px;
      opacity: 1;
      background: rgba(249, 240, 212, 1);
      box-shadow: 0 0 8px 0 rgba(240, 176, 74, 1);
      transform: rotate(45deg);
    }
  }
}
</style>
